﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameBase;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GalaxyPresident
{
    public class MeterialExploit : ExploitBuilding
    {
        private static Texture2D texture = Constant.content.Load<Texture2D>(@"Resources/Mine");
        private static Texture2D texture_s = Constant.content.Load<Texture2D>(@"Resources/Mine_s");

        public override string getObjectName()
        {
            return "Material\nExploit";
        }

        public MeterialExploit(Planet planet)
            : base(planet)
        {
            idleSequence = Sprite.String2Sequence("8");
            workSequence = Sprite.String2Sequence("0-3 8x8 4-7 8x3");
            collapseSequence = Sprite.String2Sequence("8-12");

            idleSequence_s = Sprite.String2Sequence("0");
            workSequence_s = Sprite.String2Sequence("0");
            collapseSequence_s = Sprite.String2Sequence("0-4");

            sprite_s = new Sprite(texture_s, 1, 5,
                workSequence_s, 150);
            sprite = new Sprite(texture, 2, 7,
                workSequence, 150);

            initSprites(planet);
        }

        protected override void initInfo()
        {
            meterialCost = 1000;
            moneyCost = 1000;
            energyCost = 200;

            _healthPoint = 2000;
            _defense = 0.2f;

            numberOfExploit = 6;
        }

        protected override void increaseResources()
        {
            PlanetOwner.Meterial += numberOfExploit + numberOfExploit * percentAccending;
        }

        public virtual void levelUp()
        {
            level++;
        }
    }
}
